package com.heima.zuoye.day11.timu1;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;
import java.util.Set;

public class pro {
    public static void main(String[] args) throws Exception {
        Properties pro = new Properties();
        /*pro.setProperty("brand", "Iphone11Pro Max");
        pro.setProperty("capacity", "256G");
        pro.setProperty("price", "10899");

        pro.store(new FileWriter("phone.properties"), "123");*/

        pro.load(new FileReader("phone.properties"));
        Set<String> set = pro.stringPropertyNames();
        for (String k : set) {
            String v = pro.getProperty(k);
            System.out.println(k + ":" + v);
        }
    }
}
